package com.pt.ew.image;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ImageReader {

	
	public BufferedImage readImage(String filename) throws IOException{
		 
		File file = new File("images" + File.separatorChar + filename);
		
		BufferedImage image = ImageIO.read(file);
		
		return image;
	}
	
	public static void main(String args[]) {
		ImageReader ir = new ImageReader();
		try {
			BufferedImage bi = ir.readImage("tank.png");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.exit(0);
	}
}
